<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
	<head>
		<title>新增信息</title>
		<script type="text/javascript">
		$(function(){
			$('#subjectForm .status').val('0');
			$('#subjectForm input[name="status"]').click(function(){
				var status = $('#subjectForm input[name="status"]:radio:checked').val();
				$('#subjectForm .status').val('');
				$('#subjectForm .status').val(status);
			});
		})
		
		</script>
	</head>

	<body>
		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="page-header">
				<ul class="breadcrumb">
                             <li>
                                 <i class="ace-icon fa fa-home home-icon"></i>
                                 <a href="#"><spring:message code="subject.Admin.message"/></a>
                             </li>
                         </ul>
			</div><!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<form:form id="subjectForm" class="form-horizontal" role="form" action="subjectAdd" method="post" modelAttribute="subject">
						<!-- #section:elements.form -->
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.name.message"/> </label>

							<div class="col-sm-9">
								<form:input path="name" type="text" id="form-field-1" placeholder="Name" class="col-xs-10 col-sm-3" /><form:errors path="name" cssClass="error" cssStyle="color:red"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.description.message"/> </label>

							<div class="col-sm-9">
								<form:input path="description" type="text" id="form-field-1" placeholder="Description" class="col-xs-10 col-sm-3" /><form:errors path="description" cssClass="error" cssStyle="color:red"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.testCount.message"/> </label>

							<div class="col-sm-9">
								<form:input path="testCount" type="text" id="form-field-1" placeholder="Test Count" class="col-xs-10 col-sm-3" /><form:errors path="testCount" cssClass="error" cssStyle="color:red"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.totalTime.message"/> </label>

							<div class="col-sm-9">
								<form:input path="totalTime" type="text" id="form-field-1" placeholder="Total Time" class="col-xs-10 col-sm-3" /><form:errors path="totalTime" cssClass="error" cssStyle="color:red"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.totalScore.message"/> </label>

							<div class="col-sm-9">
								<form:input path="totalScore" type="text" id="form-field-1" placeholder="Total Score" class="col-xs-10 col-sm-3" /><form:errors path="totalScore" cssClass="error" cssStyle="color:red"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> <spring:message code="subject.status.message"/> </label>

							<div class="col-sm-9">
								<form:input path="status" type="hidden" class="status"/>
								<input type="radio" name="status" value="0" checked/><spring:message code="subject.close.message"/>&nbsp;&nbsp;<input type="radio" name="status" value="1"/><spring:message code="subject.open.message"/>
							</div>
						</div>

						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<button class="btn btn-info" type="submit">
									<i class="ace-icon fa fa-check bigger-110"></i>
									<spring:message code="subject.submit.message"/>
								</button>

								&nbsp; &nbsp; &nbsp;
								<button class="btn" type="reset">
									<i class="ace-icon fa fa-undo bigger-110"></i>
									<spring:message code="user.reset.message"/>
								</button>
							</div>
						</div>

					</form:form>
				</div><!-- /.col -->
			</div><!-- /.row -->
		</div><!-- /.page-content-area -->

	</body>
</html>
